
char a;
int x=11;
int y;
void setup()
{
pinMode(9,OUTPUT);
pinMode(10,OUTPUT);
pinMode(x,INPUT);
Serial.begin(9600);

  
}
void loop()
{
  y=digitalRead(x);
  Serial.println(y);
  
 if(Serial.available() > 0){
  a = Serial.read();
 }
 
switch (y){
  case 1:
   if(Serial.available() > 0){
  a = Serial.read();
 }
  digitalWrite(9,HIGH);
  delay(1000);
  break;
  case 2:
  digitalWrite(10,HIGH);
  
  delay(1000);
  break;
}
 }

 
